#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <windows.h>
#include <windowsx.h>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQueryModel>
#include <QSqlQuery>
#include <QSqlRecord>
#include "basewindow.h"
#include "topwidget.h"
#include "contentwidget.h"

class MainWindow : public basewindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void initControl();
    void setWidegetLayout();
    bool connectDatabase();

private:
    topwidget *m_topwid;
    contentwidget *m_contentwid;
    QSqlDatabase m_db;

protected:
    bool nativeEvent(const QByteArray &eventType, void *message, long *result);
    bool winEvent(MSG *message, long *result);

};

#endif // MAINWINDOW_H
